package org.xx.b2d;

/**
 * 世界的尺寸。
 */
public enum WorldSize {
    S_640x480(640, 480),
    S_800x600(800, 600),
    S_960x720(960, 720),
    S_1280x960(1280, 960),
    S_1440x1080(1440, 1080),
    S_1600x1200(1600, 1200),
    S_1920x1440(1920, 1440),
    S_2560x1920(2560, 1920);

    private final int width;
    private final int height;
    private final float scale;

    WorldSize(
            int width,
            int height
    ) {
        this.width = width;
        this.height = height;
        this.scale = width > 0 ? width / (float) World.BASE_WIDTH : -1;
    }

    public int getWidth() {
        return this.width;
    }

    public int getHeight() {
        return this.height;
    }

    public float getScale() {
        return this.scale;
    }
}
